let url = require("url")
let str = 'https://www.baidu.com:80/api/login?a=1&n=3'
let obj = url.parse(str, true)
console.log(obj);